/*
 * 文 件 名:  DispatchAction.java
 * 版    权:  Tydic Technologies Co., Ltd. Copyright 1993-2013,  All rights reserved
 * 描    述:  <描述>
 * 修 改 人:  yanglong
 * 修改时间:  2013-11-10
 * 跟踪单号:  <需求跟踪单号>
 * 修改单号:  <需求修改单号>
 * 修改内容:  <修改内容>
 */
package com.hfut.jpoa.action;

import java.io.IOException;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.apache.commons.lang.StringUtils;
import org.apache.struts2.ServletActionContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.hfut.jpoa.common.action.AbsAction;
import com.hfut.jpoa.common.dto.Pagination;
import com.hfut.jpoa.common.dto.ResultDto;
import com.hfut.jpoa.common.util.ConstantUtil;
import com.hfut.jpoa.common.util.DateUtils;
import com.hfut.jpoa.dto.BusinessInfoDTO;
import com.hfut.jpoa.dto.DesignTypeDTO;
import com.hfut.jpoa.model.BusinessInfo;
import com.hfut.jpoa.model.Customer;
import com.hfut.jpoa.model.DesignType;
import com.hfut.jpoa.model.Notice;
import com.hfut.jpoa.model.Syspara;
import com.hfut.jpoa.model.User;
import com.hfut.jpoa.service.BusinessInfoService;
import com.hfut.jpoa.service.CustomerService;
import com.hfut.jpoa.service.NoticeService;
import com.hfut.jpoa.service.SysparaService;
import com.hfut.jpoa.service.UserService;
import com.hfut.jpoa.service.exception.BusinessInfoException;
import com.hfut.jpoa.service.exception.CustomerException;
import com.hfut.jpoa.service.exception.SysparaException;
import com.hfut.jpoa.service.exception.UserException;

/**
 * 业务信息
 * 
 * @author yanglong
 * @version [1.0, 2013-11-10]
 * @since [产品/1.0]
 */
public class BusinessInfoAction extends AbsAction<BusinessInfoDTO>
{

	private static final Logger LOGGER = LoggerFactory
	        .getLogger(BusinessInfoAction.class);

	private static final long serialVersionUID = -7819502638545092791L;

	private BusinessInfoService businessInfoService;

	private BusinessInfo businessInfo;

	private List<BusinessInfo> lstBusinessInfos;

	/**
	 * 标志位：0-增加 1-修改 2-详情
	 */
	private String actionType;

	/**
	 * 页面类型：0：调度中心 1：售后部
	 */
	private String pageType;

	/**
	 * 项目类型
	 */
	private String projectType;

	/**
	 * 包含分页接受前台变量
	 */
	private BusinessInfoDTO businessInfoDTO;

	/**
	 * 分页结果集
	 */
	private ResultDto<BusinessInfo> resultDto;

	/**
	 * 总页数
	 */
	private int totalPage;

	/**
	 * 用户列表
	 */
	private List<User> lstUsers;

	/**
	 * 创建者,以后从session中取
	 */
	private String creator = "yl";

	/**
	 * 用户服务
	 */
	private UserService userService;

	/**
	 * 字典服务
	 */
	private SysparaService sysparaService;

	/**
	 * 客户服务
	 */
	private CustomerService customerService;

	/**
	 * 字典服务
	 */
	private NoticeService noticeService;

	/**
	 * 路线列表
	 */
	private List<Syspara> lstDepart;

	/**
	 * 通知提醒
	 */
	private Notice notice;
	
	/**
	 * 设计类型
	 */
	private DesignType designType;
	
	private DesignTypeDTO designTypeDTO;

	/**
	 * 加载选择项目弹出层
	 * 
	 * @return
	 */
	public String initDialog() throws BusinessInfoException
	{
		initDate();
		return "init_dialog_list";
	}

	public String listDialog() throws BusinessInfoException
	{

		HttpServletRequest request = ServletActionContext.getRequest();
		String currentPage = request.getParameter("currentPage") == null ? ""
		        : request.getParameter("currentPage");
		Pagination pagination = new Pagination(Integer.parseInt(currentPage));
		String pagesize = request.getParameter("pageSize");
		pagination.setPageSize(Integer.parseInt(pagesize));
		if (businessInfoDTO == null)
		{
			businessInfoDTO = new BusinessInfoDTO();
		}
		businessInfoDTO.setPagination(pagination);
		resultDto = businessInfoService.queryInfoForPage(businessInfoDTO);

		totalPage = resultDto.getPagination().getTotalPage();

		return "dispatch_dialog_list";
	}

	/**
	 * 初始化部门列表
	 * 
	 * @return
	 * @throws BusinessInfoException
	 */
	private List<Syspara> findLstDepart() throws BusinessInfoException
	{
		// 从字典表中加载初始化部门列表
		List<Syspara> lstDepartTemp = new ArrayList<Syspara>();
		try
		{
			Syspara syspara = new Syspara();
			syspara.setType(ConstantUtil.DEPARTMENT);
			lstDepartTemp = sysparaService.querySysparaList(syspara);
		} catch (SysparaException e)
		{
			LOGGER.error("初始化部门列表异常：", e);
			throw new BusinessInfoException("初始化部门列表异常：", e);
		}
		return lstDepartTemp;
	}

	/**
	 * 加载列表页显示数据
	 */
	private void initDate() throws BusinessInfoException
	{

		BusinessInfoDTO dto = new BusinessInfoDTO();
		Pagination pagination = new Pagination(0);
		dto.setPagination(pagination);
		resultDto = businessInfoService.queryInfoForPage(dto);
		totalPage = resultDto.getPagination().getTotalPage();
	}

	/**
	 * 加载商务信息列表
	 */
	public String toCommerceList() throws BusinessInfoException
	{
		projectType = ConstantUtil.PROJECTTYPE_COMMERCE;
		actionType = ConstantUtil.ACTIONTYPE_LIST;
		// 业务信息页面
		pageType = ConstantUtil.PAGETYPE_BUSINESS_INFO;
		// 跳转页面
		return "list_init";
	}

	/**
	 * 加载业务信息分页列表
	 * 
	 * @return
	 * @throws BusinessInfoException
	 */
	public String listInit() throws BusinessInfoException
	{
		projectType = ConstantUtil.PROJECTTYPE_BUSINESS;
		actionType = ConstantUtil.ACTIONTYPE_LIST;
		// 业务信息页面
		pageType = ConstantUtil.PAGETYPE_BUSINESS_INFO;
		// 跳转页面
		return "list_init";
	}

	/**
	 * 设计订单类型飞i也列表请求
	 * 
	 * @return
	 */
	public String toDesignType() throws BusinessInfoException
	{
		// 跳转页面
		return "design_type_list_init";
	}

	/**
	 * 加载业务订单分页列表
	 * 
	 * @return
	 * @throws BusinessInfoException
	 */
	public String toBusinessOrder() throws BusinessInfoException
	{
		// 订单页面
		pageType = ConstantUtil.PAGETYPE_BUSINESS_ORDER;
		projectType = ConstantUtil.PROJECTTYPE_BUSINESS;
		// 跳转页面
		return "order_list_init";
	}

	/**
	 * 加载设计订单分页列表
	 * 
	 * @return
	 * @throws BusinessInfoException
	 */
	public String toCommerceOrder() throws BusinessInfoException
	{
		// 订单页面
		pageType = ConstantUtil.PAGETYPE_BUSINESS_ORDER;
		projectType = ConstantUtil.PROJECTTYPE_COMMERCE;
		// 跳转页面
		return "order_list_init";
	}

	/**
	 * 加载业务报价分页列表
	 * 
	 * @return
	 * @throws BusinessInfoException
	 */
	public String toBusinessQuote() throws BusinessInfoException
	{
		// 报价页面
		pageType = ConstantUtil.PAGETYPE_BUSINESS_QUOTE;
		// 跳转页面
		return "order_list_init";
	}

	public String toCenterList() throws BusinessInfoException
	{
		if (businessInfoDTO == null)
		{
			businessInfoDTO = new BusinessInfoDTO();
			BusinessInfo buInfo = new BusinessInfo();
			businessInfoDTO.setBusinessInfo(buInfo);
		}
		// 展示未转业务订单的业务信息
		businessInfoDTO.getBusinessInfo().setResult("0");
		listDate();
		actionType = ConstantUtil.ACTIONTYPE_CENTER;
		return "list";
	}

	/**
	 * 加载设计类型列表数据
	 * 
	 * @return
	 */
	public String listDesignType() throws BusinessInfoException
	{
		if (businessInfoDTO == null)
		{
			businessInfoDTO = new BusinessInfoDTO();
			BusinessInfo buInfo = new BusinessInfo();
			businessInfoDTO.setBusinessInfo(buInfo);
		}
		// 业务信息页面
		pageType = ConstantUtil.PAGETYPE_BUSINESS_INFO;
		// 展示未转业务订单的业务信息
		businessInfoDTO.getBusinessInfo().setResult("0");
		businessInfoDTO.getBusinessInfo().setType(0);
		// 项目类型
		projectType = ConstantUtil.PROJECTTYPE_BUSINESS;
		listDate();
		actionType = ConstantUtil.ACTIONTYPE_LIST;
		return "list";
	}
	/**
	 * 加载业务列表数据
	 * 
	 * @return
	 */
	public String list() throws BusinessInfoException
	{
		if (businessInfoDTO == null)
		{
			businessInfoDTO = new BusinessInfoDTO();
			BusinessInfo buInfo = new BusinessInfo();
			businessInfoDTO.setBusinessInfo(buInfo);
		}
		// 业务信息页面
		pageType = ConstantUtil.PAGETYPE_BUSINESS_INFO;
		// 展示未转业务订单的业务信息
		businessInfoDTO.getBusinessInfo().setResult("0");
		businessInfoDTO.getBusinessInfo().setType(0);
		// 项目类型
		projectType = ConstantUtil.PROJECTTYPE_BUSINESS;
		listDate();
		actionType = ConstantUtil.ACTIONTYPE_LIST;
		return "list";
	}

	/**
	 * 加载商务列表数据
	 * 
	 * @return
	 */
	public String listCommerce() throws BusinessInfoException
	{
		if (businessInfoDTO == null)
		{
			businessInfoDTO = new BusinessInfoDTO();
			BusinessInfo buInfo = new BusinessInfo();
			businessInfoDTO.setBusinessInfo(buInfo);
		}
		// 业务信息页面
		pageType = ConstantUtil.PAGETYPE_BUSINESS_INFO;
		// 展示未转业务订单的业务信息
		businessInfoDTO.getBusinessInfo().setResult("0");
		businessInfoDTO.getBusinessInfo().setType(1);
		// 项目类型
		projectType = ConstantUtil.PROJECTTYPE_COMMERCE;
		listDate();
		actionType = ConstantUtil.ACTIONTYPE_LIST;
		return "list";
	}

	/**
	 * 加载业务订单列表
	 * 
	 * @return
	 */
	public String listOrder() throws BusinessInfoException
	{
		if (businessInfoDTO == null)
		{
			businessInfoDTO = new BusinessInfoDTO();
			BusinessInfo buInfo = new BusinessInfo();
			businessInfoDTO.setBusinessInfo(buInfo);
		}
		// 订单页面
		pageType = ConstantUtil.PAGETYPE_BUSINESS_ORDER;

		// 展示转业务订单的业务信息
		businessInfoDTO.getBusinessInfo().setResult("1");
		listDate();
		actionType = ConstantUtil.ACTIONTYPE_LIST;
		return "order_list";
	}

	/**
	 * 加载业务订单列表
	 * 
	 * @return
	 */
	public String listQuote() throws BusinessInfoException
	{
		if (businessInfoDTO == null)
		{
			businessInfoDTO = new BusinessInfoDTO();
			BusinessInfo buInfo = new BusinessInfo();
			businessInfoDTO.setBusinessInfo(buInfo);
		}
		// 订单页面
		pageType = ConstantUtil.PAGETYPE_BUSINESS_QUOTE;

		// 展示转业务订单的业务信息
		businessInfoDTO.getBusinessInfo().setResult("1");
		businessInfoDTO.getBusinessInfo().setIsCollect("0");

		listDate();
		actionType = ConstantUtil.ACTIONTYPE_LIST;
		return "order_list";
	}

	/**
	 * 根据客户ID封装客户名称
	 * 
	 * @param cutomerId
	 * @return
	 * @throws BusinessInfoException
	 */
	private String packageCustomerName(String cutomerId)
	        throws BusinessInfoException
	{
		String result = "";
		if (StringUtils.isNumeric(cutomerId))
		{
			Customer customer = new Customer();
			customer.setId(Integer.valueOf(cutomerId));
			// 客户名称
			try
			{
				Customer findCustomer = customerService.findCustomer(customer);
				result = findCustomer.getName();
			} catch (CustomerException e)
			{
				LOGGER.error("根据客户ID查询客户名称异常！", e);
			}
		}
		return result;
	}

	private void listDate() throws BusinessInfoException
	{

		HttpServletRequest request = ServletActionContext.getRequest();
		String currentPage = request.getParameter("currentPage");
		Pagination pagination = new Pagination(Integer.parseInt(currentPage));
		String pagesize = request.getParameter("pageSize");
		pagination.setPageSize(Integer.parseInt(pagesize));

		businessInfoDTO.setPagination(pagination);
		resultDto = businessInfoService.queryInfoForPage(businessInfoDTO);

		List<BusinessInfo> result = resultDto.getResult();

		// 加载用户列表
		List<User> initLstUser = initLstUser();
		// 加载客户

		for (int i = 0; i < result.size(); i++)
		{
			// 客户信息
			if (StringUtils.isNotBlank(result.get(i).getCustomerId()))
			{
				result.get(i).setCustomerName(
				        packageCustomerName(result.get(i).getCustomerId()));
			}

			// 用户名
			for (int j = 0; j < initLstUser.size(); j++)
			{
				if (StringUtils.equals(result.get(i).getCreator(), initLstUser
				        .get(j).getUserCode()))
				{
					result.get(i).setCreatorName(initLstUser.get(j).getName());
				}
				if (StringUtils.equals(result.get(i).getBusinessMan(),
				        initLstUser.get(j).getUserCode()))
				{
					result.get(i).setBusinessManName(
					        initLstUser.get(j).getName());
				}
				if (StringUtils.equals(result.get(i).getFirstHead(),
				        initLstUser.get(j).getUserCode()))
				{
					result.get(i)
					        .setFirstHeadName(initLstUser.get(j).getName());
				}
				if (StringUtils.equals(result.get(i).getSecondHead(),
				        initLstUser.get(j).getUserCode()))
				{
					result.get(i).setSecondHeadName(
					        initLstUser.get(j).getName());
				}
				if (StringUtils.equals(result.get(i).getThreeHead(),
				        initLstUser.get(j).getUserCode()))
				{
					result.get(i)
					        .setThreeHeadName(initLstUser.get(j).getName());
				}
				if (StringUtils.equals(result.get(i).getUpdatePeople(),
				        initLstUser.get(j).getUserCode()))
				{
					result.get(i).setUpdatePeopleName(
					        initLstUser.get(j).getName());
				}

			}

		}

		totalPage = resultDto.getPagination().getTotalPage();

	}

	/**
	 * 加载用户列表
	 * 
	 * @param user
	 * @return
	 * @throws BusinessInfoException
	 */
	public List<User> initLstUser() throws BusinessInfoException
	{
		// 加载员工

		User user = new User();

		List<User> lstUser;
		try
		{
			lstUser = userService.queryUser(user);
		} catch (UserException e)
		{
			LOGGER.error("加载员工异常：", e);
			throw new BusinessInfoException("加载员工异常：", e);
		}
		return lstUser;
	}

	/**
	 * 新增页面初始化
	 * 
	 * @return
	 */
	public String addInit() throws BusinessInfoException
	{
		projectType = ConstantUtil.PROJECTTYPE_BUSINESS;
		actionType = ConstantUtil.ACTIONTYPE_ADD;
		return "add_init";
	}

	/**
	 * 新增页面初始化
	 * 
	 * @return
	 */
	public String addCommerceInit() throws BusinessInfoException
	{
		projectType = ConstantUtil.PROJECTTYPE_COMMERCE;
		actionType = ConstantUtil.ACTIONTYPE_ADD;
		return "add_init";
	}

	/**
	 * 新增保存
	 * 
	 * @return
	 * @throws ParseException
	 */
	public String add() throws BusinessInfoException, ParseException
	{

		Date createDate = DateUtils.getNowDate();
		businessInfo.setUpdatePeople(creator);
		businessInfo.setLastUpdateDate(createDate);
		businessInfo.setCreator(creator);
		businessInfo.setCreateDate(createDate);
		businessInfo.setIsCheck("0");
		businessInfo.setIsCollect("0");
		businessInfo.setIsInvoice("0");

		businessInfoService.saveBusinessInfo(businessInfo);

		projectType = ConstantUtil.PROJECTTYPE_COMMERCE;
		actionType = ConstantUtil.ACTIONTYPE_LIST;
		pageType = ConstantUtil.PAGETYPE_BUSINESS_INFO;

		return "list_init";
	}

	/**
	 * 管理中处理页面初始化
	 */
	public String processInit() throws BusinessInfoException
	{

		actionType = ConstantUtil.ACTIONTYPE_CENTER;
		BusinessInfo resultDispatch = businessInfoService
		        .findInfo(businessInfo);
		businessInfo = resultDispatch;
		businessInfo.setCustomerName(packageCustomerName(businessInfo
		        .getCustomerId()));
		return "add_init";
	}

	/**
	 * 转业务订单
	 * 
	 * @throws BusinessInfoException
	 * @throws IOException
	 * @throws ParseException
	 */
	public void shiftBusinessOrder() throws BusinessInfoException, IOException,
	        ParseException
	{
		if (null == businessInfo)
		{
			failure("系统异常，请联系管理员！");
		}
		businessInfo.setResult("1");
		Date createDate = DateUtils.getNowDate();
		businessInfo.setUpdatePeople(creator);
		businessInfo.setLastUpdateDate(createDate);
		businessInfoService.update(businessInfo);
		success("操作成功！");
	}

	/**
	 * 收款
	 * 
	 * @throws BusinessInfoException
	 * @throws IOException
	 * @throws ParseException
	 */
	public void processCollect() throws BusinessInfoException, IOException,
	        ParseException
	{
		if (null == businessInfo)
		{
			failure("系统异常，请联系管理员！");
		}
		businessInfo.setIsCollect("1");
		Date createDate = DateUtils.getNowDate();
		businessInfo.setUpdatePeople(creator);
		businessInfo.setLastUpdateDate(createDate);
		businessInfoService.update(businessInfo);
		success("操作成功！");
	}

	/**
	 * 审核
	 * 
	 * @throws BusinessInfoException
	 * @throws IOException
	 * @throws ParseException
	 */
	public void processCheck() throws BusinessInfoException, IOException,
	        ParseException
	{
		if (null == businessInfo)
		{
			failure("系统异常，请联系管理员！");
		}
		businessInfo.setIsCheck("1");
		Date createDate = DateUtils.getNowDate();
		businessInfo.setUpdatePeople(creator);
		businessInfo.setLastUpdateDate(createDate);
		businessInfoService.update(businessInfo);
		success("操作成功！");
	}

	/**
	 * 开票
	 * 
	 * @throws BusinessInfoException
	 * @throws IOException
	 * @throws ParseException
	 */
	public void processInvoice() throws BusinessInfoException, IOException,
	        ParseException
	{
		if (null == businessInfo)
		{
			failure("系统异常，请联系管理员！");
		}
		businessInfo.setIsInvoice("1");
		Date createDate = DateUtils.getNowDate();
		businessInfo.setUpdatePeople(creator);
		businessInfo.setLastUpdateDate(createDate);
		businessInfoService.update(businessInfo);
		success("操作成功！");
	}

	/**
	 * 修改提醒状态
	 * 
	 * @return
	 * @throws BusinessInfoException
	 * @throws IOException
	 */
	public void processBusinessInfo() throws BusinessInfoException, IOException
	{
		if (null == businessInfo)
		{
			failure("系统异常，请联系管理员！");
		}
		businessInfo.setResult("1");
		businessInfoService.update(businessInfo);
		success("操作成功！");
	}

	/**
	 * 修改页面初始化
	 */
	public String updateInit() throws BusinessInfoException
	{

		actionType = ConstantUtil.ACTIONTYPE_UPDATE;
		BusinessInfo resultDispatch = businessInfoService
		        .findInfo(businessInfo);
		businessInfo = resultDispatch;
		businessInfo.setCustomerName(packageCustomerName(businessInfo
		        .getCustomerId()));
		return "add_init";
	}

	/**
	 * 订单报价页面初始化
	 * 
	 * @return
	 * @throws BusinessInfoException
	 */
	public String businessQuoteInit() throws BusinessInfoException
	{
		actionType = ConstantUtil.ACTIONTYPE_QUOTE;
		pageType = ConstantUtil.PAGETYPE_BUSINESS_ORDER;
		BusinessInfo resultDispatch = businessInfoService
		        .findInfo(businessInfo);
		businessInfo = resultDispatch;
		businessInfo.setCustomerName(packageCustomerName(businessInfo
		        .getCustomerId()));
		return "order_add_init";
	}

	/**
	 * 订单修改页面初始化
	 * 
	 * @return
	 * @throws BusinessInfoException
	 */
	public String updateOrderInit() throws BusinessInfoException
	{
		actionType = ConstantUtil.ACTIONTYPE_UPDATE;
		pageType = ConstantUtil.PAGETYPE_BUSINESS_ORDER;
		BusinessInfo resultDispatch = businessInfoService
		        .findInfo(businessInfo);
		businessInfo = resultDispatch;
		businessInfo.setCustomerName(packageCustomerName(businessInfo
		        .getCustomerId()));
		return "order_add_init";
	}

	/**
	 * 修改字典表
	 * 
	 * @return
	 * @throws BusinessInfoException
	 * @throws ParseException
	 */
	public String update() throws BusinessInfoException, ParseException
	{
		Date createDate = DateUtils.getNowDate();
		businessInfo.setUpdatePeople(creator);
		businessInfo.setLastUpdateDate(createDate);
		businessInfoService.update(businessInfo);

		projectType = ConstantUtil.PROJECTTYPE_COMMERCE;
		actionType = ConstantUtil.ACTIONTYPE_LIST;
		pageType = ConstantUtil.PAGETYPE_BUSINESS_INFO;
		return "list_init";
	}

	/**
	 * 修改
	 */
	public void updateState()
	{
		/*
		 * try { // dispatchService.updateDispatch(dispatch); } catch
		 * (BusinessInfoException e1) { try { failure("操作异常：" +
		 * e1.getMessage()); } catch (IOException e) { LOGGER.error("修改字典配置异常",
		 * e); } } try { success("成功操作！"); } catch (IOException e) {
		 * LOGGER.error("修改字典配置异常", e); }
		 */
	}

	/**
	 * 删除
	 * 
	 * @throws IOException
	 */
	public void delete() throws BusinessInfoException, IOException
	{
		if (businessInfoService.delete(businessInfo) > 0)
		{
			success("操作成功！");
		} else
		{
			failure("操作失败，请联系管理员！");
		}
	}

	/**
	 * 验证编码是否存在
	 * 
	 * @throws IOException
	 */
	public void codeValidator() throws IOException
	{
		/*
		 * boolean flag = false; try { flag =
		 * dispatchService.codeValidator(dispatch); } catch
		 * (BusinessInfoException e) { LOGGER.error("验证编码是否存在异常", e);
		 * failure("验证编码是否存在异常" + e.getMessage()); } if (flag) {
		 * failure("该编码已存在，请重新输入"); } else { success("输入正确，该编码可以使用"); }
		 */
	}

	public String getActionType()
	{
		return actionType;
	}

	public void setActionType(String actionType)
	{
		this.actionType = actionType;
	}

	public int getTotalPage()
	{
		return totalPage;
	}

	public void setTotalPage(int totalPage)
	{
		this.totalPage = totalPage;
	}

	public UserService getUserService()
	{
		return userService;
	}

	public void setUserService(UserService userService)
	{
		this.userService = userService;
	}

	public List<User> getLstUsers()
	{
		try
		{
			lstUsers = initLstUser();
		} catch (BusinessInfoException e)
		{
			LOGGER.error("查询用户异常：", e);
		}
		return lstUsers;
	}

	public void setLstUsers(List<User> lstUsers)
	{
		this.lstUsers = lstUsers;
	}

	public String getPageType()
	{
		return pageType;
	}

	public void setPageType(String pageType)
	{
		this.pageType = pageType;
	}

	public CustomerService getCustomerService()
	{
		return customerService;
	}

	public void setCustomerService(CustomerService customerService)
	{
		this.customerService = customerService;
	}

	public NoticeService getNoticeService()
	{
		return noticeService;
	}

	public void setNoticeService(NoticeService noticeService)
	{
		this.noticeService = noticeService;
	}

	public List<Syspara> getLstDepart()
	{
		try
		{
			lstDepart = findLstDepart();
		} catch (BusinessInfoException e)
		{
			LOGGER.error("查询部门异常：", e);
		}
		return lstDepart;
	}

	public void setLstDepart(List<Syspara> lstDepart)
	{
		this.lstDepart = lstDepart;
	}

	public SysparaService getSysparaService()
	{
		return sysparaService;
	}

	public void setSysparaService(SysparaService sysparaService)
	{
		this.sysparaService = sysparaService;
	}

	public Notice getNotice()
	{
		return notice;
	}

	public void setNotice(Notice notice)
	{
		this.notice = notice;
	}

	public BusinessInfoService getBusinessInfoService()
	{
		return businessInfoService;
	}

	public void setBusinessInfoService(BusinessInfoService businessInfoService)
	{
		this.businessInfoService = businessInfoService;
	}

	public BusinessInfo getBusinessInfo()
	{
		return businessInfo;
	}

	public void setBusinessInfo(BusinessInfo businessInfo)
	{
		this.businessInfo = businessInfo;
	}

	public List<BusinessInfo> getLstBusinessInfos()
	{
		return lstBusinessInfos;
	}

	public void setLstBusinessInfos(List<BusinessInfo> lstBusinessInfos)
	{
		this.lstBusinessInfos = lstBusinessInfos;
	}

	public BusinessInfoDTO getBusinessInfoDTO()
	{
		return businessInfoDTO;
	}

	public void setBusinessInfoDTO(BusinessInfoDTO businessInfoDTO)
	{
		this.businessInfoDTO = businessInfoDTO;
	}

	public ResultDto<BusinessInfo> getResultDto()
	{
		return resultDto;
	}

	public void setResultDto(ResultDto<BusinessInfo> resultDto)
	{
		this.resultDto = resultDto;
	}

	public String getCreator()
	{
		return creator;
	}

	public void setCreator(String creator)
	{
		this.creator = creator;
	}

	public String getProjectType()
	{
		return projectType;
	}

	public void setProjectType(String projectType)
	{
		this.projectType = projectType;
	}

}
